Chatroom with chatbot
Published:
Understand and implement a socket chatroom with a chatbot
1. Main idea
- This project will have 2 features:
- A socket-based chatroom enabling multiple users to join and chat.
- As an alternative, user can also choose to chat with our chatbot, which can have both chit-chat and task-oriented converstaions.
2. Architecture
- User type message in the GUI.
- flask webserver send that message to message communication server.
- Communication server broadcast message to all users.
- Each user will see the message shown up on GUI rendered by flask webserver.
3. Neural Chatbot
- A Sequence-to-Sequence(Seq2Seq) model.
- With attention mechanism
- Greedy decoding is better than beam search decoding
- Different from intention-based chatbot. Intention-based chatbot is doing a classification problem, classifying what specific intention does the sentence have. And then randomly pick one response from that corresponding intention.
4. Comparison and Evaluation
- Seq2seq with vs without attention. Greedy decoding vs Beam decoding.
- Sentence diversity
- Average length
5. Limitations resulting from training sources.
- Input should be all lower-cases.
- Current training pickle file only has 53065 pairs of movie lines.
6. Some sentences you can try
- Performed well
- looks like things worked out tonight huh ?
- you re sweet .
- hello.
- please share you bank account number with me.
- i have never met someone more annoying that you.
- i’m so bored. give some suggestions.
- stop running or you’ll fall hard.
- do you believe in a miracle?
- let s go .
- expensive ?
- hi daddy .
- he was like a total babe.
- and where re you going ?
- how many people go here ?
- Performed not so well
- which sport team do you like? - not ideal
- what is your favorite sport?
- give me coffee, or i’ll hate you.
- i like pizza. what do you like?
7. Relationship between Seq2Seq and Encoder-Decoder
- Seq2Seq(强调目的)不特指具体方法,满足「输入序列、输出序列」的目的,都可以统称为 Seq2Seq 模型
- 而 Seq2Seq 使用的具体方法基本都属于Encoder-Decoder 模型(强调方法)的范畴